const button = document.querySelector("button");

function greet() {
  const name = prompt("我知道你的名字对吗^-^");
  const greeting = document.querySelector("#greeting");
  greeting.textContent = `你好呀，${name}宝宝！我爱你！`;
}
button.addEventListener("click", greet);